<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>SB Admin</title>
    <!-- Bootstrap core CSS-->
    <link href="/fashionpress/admin/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom fonts for this template-->
    <link href="/fashionpress/admin/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!-- Custom styles for this template-->
    <link href="/fashionpress/admin/css/sb-admin.css" rel="stylesheet">
</head>

<body class="bg-dark">
<div class="container">
    <div class="card card-login mx-auto mt-5">
        <div class="card-header">Reset Password</div>
        <div class="card-body">
            <div class="text-center mt-4 mb-5">
                <h4>Forgot your password?</h4>
                <p>Enter your reginster phone and we will help you to reset your password.</p>
            </div>
            <form action="/fashionpress/admin/forgotPassword" method="post">
                <div class="form-group">
                    <input type="hidden" name="adminUsername" th:value="${adminName}" >

                </div>
                <div class="form-group">
                    <input class="form-control" id="Password" type="password" name="adminPassword" pattern="^[a-zA-Z0-9]\w{5-19}$" placeholder="Enter you new Password 10-20 位" required oninput="this.setCustomValidity('')" oninvalid="this.setCustomValidity('请输入正确的密码')" onchange="checkpassword()"/>

                </div>
                <div class="form-group">
                    <input class="form-control" id="Repassword" type="password" name="adminPassword2"  placeholder="Enter you new Password" required onchange="checkpassword()"/>
                </div>
                <div class="form-group">
                    <input class="form-control" type="submit" value="Reset Password">
                </div>
            </form>
            <div class="text-center">
                <a class="d-block small" href="/fashionpress/admin/">Login Page</a>
            </div>
        </div>
    </div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="/fashionpress/admin/vendor/jquery/jquery.min.js"></script>
<script src="/fashionpress/admin/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="/fashionpress/admin/vendor/jquery-easing/jquery.easing.min.js"></script>
<script>
    function checkpassword(){
        var pass1=document.getElementById('password');
        var pass2=document.getElementById('repassword');
        if(pass1.value!=pass2.value){
            pass2.setCustomValidity("两次密码输入不一致");
        }else{
            pass2.setCustomValidity("");
        }
    }
</script>
</body>

</html>